using System.Linq;
using System.Text;
using System.Diagnostics;
using System.Runtime.Serialization;
using System.Collections;
using System.Data;
using System.ComponentModel;
using System.Data.OracleClient;
using WPFExcelReport.Helpers;
using WPFExcelReport.Controls;
namespace WPFExcelReport
{
    public partial class VLMUSTER
    {
        public DataRow Convert2LMUSTER(DataRow dwInput, string ITXDBVERSION, bool IsConvert = false)
        {
            DataSet SResult = new DataSet();
            SResult = QueryLMUSTER(dwInput, 0);
            DataRow dwReturn = null;
            if (SResult.Tables[0].Rows.Count > 0)
            {
                dwReturn = SResult.Tables[0].Rows[0];
            }
            else
            {
                dwReturn = SResult.Tables[0].NewRow();
            }
            switch (ITXDBVERSION)
            {
                case "YGR":
                    #region=========
         dwReturn["LMMANDANT"] = " ".PadRight(2 ); 
         dwReturn["LMKUNDNR"] = " ".PadRight(8 ); 
         dwReturn["LMWERK"] = " ".PadRight(3 ); 
         dwReturn["LMABT"] = " ".PadRight(3 ); 
         dwReturn["LMART"] = " ".PadRight(20 ); 
         dwReturn["LMVAR"] = " ".PadRight(2 ); 
         dwReturn["LMMUART"] = " ".PadRight(1 ); 
         dwReturn["LMFARBE"] = " ".PadRight(10 ); 
         dwReturn["LMVERSION"] = " ".PadRight(2 ); 
         dwReturn["LMFARBBEZ"] = " ".PadRight(20 ); 
         dwReturn["LMAUFKRS"] = " ".PadRight(2 ); 
         dwReturn["LMAUFLFD"] = " ".PadRight(6 ); 
         dwReturn["LMAUFPOS"] = " ".PadRight(3 ); 
         dwReturn["LMLABORFB"] = " ".PadRight(1 ); 
         dwReturn["LMANGEDAT"] = " ".PadRight(8 ); 
         dwReturn["LMVERTDAT"] = " ".PadRight(8 ); 
         dwReturn["LMVORLDAT"] = " ".PadRight(8 ); 
         dwReturn["LMAKZPDAT"] = " ".PadRight(8 ); 
         dwReturn["LMAWERK"] = " ".PadRight(3 ); 
         dwReturn["LMAABT"] = " ".PadRight(3 ); 
         dwReturn["LMAART"] = " ".PadRight(20 ); 
         dwReturn["LMAVAR"] = " ".PadRight(2 ); 
         dwReturn["LMSPGRD"] = " ".PadRight(3 ); 
         dwReturn["LMSPSB"] = " ".PadRight(8 ); 
         dwReturn["LMVERMERK"] = " ".PadRight(40 ); 
         dwReturn["LMKSTKRS1"] = " ".PadRight(2 ); 
         dwReturn["LMKST1"] = " ".PadRight(4 ); 
         dwReturn["LMANZ1"] = " ".PadRight(1 ); 
         dwReturn["LMVORLNR1"] = " ".PadRight(15 ); 
         dwReturn["LMMUNR1"] = " ".PadRight(10 ); 
         dwReturn["LMAKSTKRS1"] = " ".PadRight(2 ); 
         dwReturn["LMAKST1"] = " ".PadRight(4 ); 
         dwReturn["LMADAT1"] = " ".PadRight(8 ); 
         dwReturn["LMMUKL1"] = " ".PadRight(6 ); 
         dwReturn["LMTOLFKT1"] = " ".PadRight(0 ); 
         dwReturn["LMKSTKRS2"] = " ".PadRight(2 ); 
         dwReturn["LMKST2"] = " ".PadRight(4 ); 
         dwReturn["LMANZ2"] = " ".PadRight(1 ); 
         dwReturn["LMVORLNR2"] = " ".PadRight(15 ); 
         dwReturn["LMMUNR2"] = " ".PadRight(10 ); 
         dwReturn["LMAKSTKRS2"] = " ".PadRight(2 ); 
         dwReturn["LMAKST2"] = " ".PadRight(4 ); 
         dwReturn["LMADAT2"] = " ".PadRight(8 ); 
         dwReturn["LMMUKL2"] = " ".PadRight(6 ); 
         dwReturn["LMTOLFKT2"] = " ".PadRight(0 ); 
         dwReturn["LMKSTKRS3"] = " ".PadRight(2 ); 
         dwReturn["LMKST3"] = " ".PadRight(4 ); 
         dwReturn["LMANZ3"] = " ".PadRight(1 ); 
         dwReturn["LMVORLNR3"] = " ".PadRight(15 ); 
         dwReturn["LMMUNR3"] = " ".PadRight(10 ); 
         dwReturn["LMAKSTKRS3"] = " ".PadRight(2 ); 
         dwReturn["LMAKST3"] = " ".PadRight(4 ); 
         dwReturn["LMADAT3"] = " ".PadRight(8 ); 
         dwReturn["LMMUKL3"] = " ".PadRight(6 ); 
         dwReturn["LMTOLFKT3"] = " ".PadRight(0 ); 
         dwReturn["LMKSTKRS4"] = " ".PadRight(2 ); 
         dwReturn["LMKST4"] = " ".PadRight(4 ); 
         dwReturn["LMANZ4"] = " ".PadRight(1 ); 
         dwReturn["LMVORLNR4"] = " ".PadRight(15 ); 
         dwReturn["LMMUNR4"] = " ".PadRight(10 ); 
         dwReturn["LMAKSTKRS4"] = " ".PadRight(2 ); 
         dwReturn["LMAKST4"] = " ".PadRight(4 ); 
         dwReturn["LMADAT4"] = " ".PadRight(8 ); 
         dwReturn["LMMUKL4"] = " ".PadRight(6 ); 
         dwReturn["LMTOLFKT4"] = " ".PadRight(0 ); 
         dwReturn["LMKSTKRS5"] = " ".PadRight(2 ); 
         dwReturn["LMKST5"] = " ".PadRight(4 ); 
         dwReturn["LMANZ5"] = " ".PadRight(1 ); 
         dwReturn["LMVORLNR5"] = " ".PadRight(15 ); 
         dwReturn["LMMUNR5"] = " ".PadRight(10 ); 
         dwReturn["LMAKSTKRS5"] = " ".PadRight(2 ); 
         dwReturn["LMAKST5"] = " ".PadRight(4 ); 
         dwReturn["LMADAT5"] = " ".PadRight(8 ); 
         dwReturn["LMMUKL5"] = " ".PadRight(6 ); 
         dwReturn["LMTOLFKT5"] = " ".PadRight(0 ); 
         dwReturn["LMKSTKRS6"] = " ".PadRight(2 ); 
         dwReturn["LMKST6"] = " ".PadRight(4 ); 
         dwReturn["LMANZ6"] = " ".PadRight(1 ); 
         dwReturn["LMVORLNR6"] = " ".PadRight(15 ); 
         dwReturn["LMMUNR6"] = " ".PadRight(10 ); 
         dwReturn["LMAKSTKRS6"] = " ".PadRight(2 ); 
         dwReturn["LMAKST6"] = " ".PadRight(4 ); 
         dwReturn["LMADAT6"] = " ".PadRight(8 ); 
         dwReturn["LMMUKL6"] = " ".PadRight(6 ); 
         dwReturn["LMTOLFKT6"] = " ".PadRight(0 ); 
         dwReturn["LMFKARTE"] = " ".PadRight(10 ); 
         dwReturn["LMFILLER"] = " ".PadRight(117 ); 
         dwReturn["LMAENDZL"] = " ".PadRight(3 ); 
         dwReturn["LMAENDBEN"] = " ".PadRight(8 ); 
         dwReturn["LMAENDDAT"] = " ".PadRight(6 ); 
         dwReturn["LMNEUBEN"] = " ".PadRight(8 ); 
         dwReturn["LMNEUDAT"] = " ".PadRight(6 ); 
                    #endregion
                    break;
                case "JLT":

                    break;
                default:

                    break;
            }
            if (IsConvert)
            {
                foreach (DataColumn cm in dwInput.Table.Columns)
                {
                    if (dwInput[cm.ColumnName].ToString() == "")
                        continue;
                    if (dwReturn.Table.Columns.Contains(cm.ColumnName))
                    {
                        dwReturn[cm.ColumnName] = dwInput[cm.ColumnName];
                    }
                }
            }
            return dwReturn;
        }
        public void MapLMUSTER(ref DataRow dwLocal, DataRow dwData)
        {
            BlindMap(ref dwLocal, dwData);
        }
        public void SaveLMUSTER(DataRow dwData, string ITXDBVERSION = "50.24")
        {
            DataSet setResult = new DataSet();
            DataTable tbLocal = null;
            DataRow dwLocal = null;
            bool flgExist = false;
            setResult = QueryLMUSTER(dwData);
            if (setResult.Tables.Count > 0)
            {
                tbLocal = setResult.Tables[0];
                if (tbLocal.Rows.Count > 0)
                {
                    flgExist = true;
                    dwLocal = tbLocal.Rows[0];
                }
                else
                {
                    dwLocal = tbLocal.NewRow();
                }
            }
            MapLMUSTER(ref dwLocal, dwData);

            if (!flgExist)
            {

                InsertLMUSTER(dwLocal, ITXDBVERSION);
            }
            UpdateLMUSTER(dwLocal);
        }
        public void InsertLMUSTER(DataRow dwData, string ITXDBVERSION = "50.24")
        {
            OracleCommand or1;
            or1 = OracleDB.CreateCommand();
            switch (ITXDBVERSION)
            {
                case "YGR":
                    or1.CommandText = "INSERT INTO LMUSTER(VAKBMANDANT, VAKBKOLL, VAKBART, VAKBKUNDNR, VAKBFARBE, VAKBKDARTNR, VAKBKDARTBEZ, VAKBKDFARBNR, VAKBANDRUCK, VAKBMEGEW, VAKBMENGEH, VAKBGEWVON, VAKBGEWBIS, VAKBGEWCA, VAKBGEWFKT, VAKBGEWGRP, VAKBMEGFKT, VAKBMEGGRP, VAKBAENDZL, VAKBAENDBEN, VAKBAENDDAT, VAKBNEUBEN, VAKBNEUDAT, VAKBFILLER)"
                        + " VALUES (:VAKBMANDANT, :VAKBKOLL, :VAKBART, :VAKBKUNDNR, :VAKBFARBE, '                         ', '                         ', '                             ', ' ', '   ', '   ', 0, 0, ' ', '000000000000', ' ', '000000000000', ' ', 0, '        ', '000000', '        ', '      ', '                                          ')";
                    or1.Parameters.Add("VAKBMANDANT", OracleType.NVarChar).Value = dwData["VAKBMANDANT"].ToString();
                    or1.Parameters.Add("VAKBKOLL", OracleType.NVarChar).Value = dwData["VAKBKOLL"].ToString();
                    or1.Parameters.Add("VAKBART", OracleType.NVarChar).Value = dwData["VAKBART"].ToString();
                    or1.Parameters.Add("VAKBFARBE", OracleType.NVarChar).Value = dwData["VAKBFARBE"].ToString();
                    or1.Parameters.Add("VAKBKUNDNR", OracleType.NVarChar).Value = dwData["VAKBKUNDNR"].ToString();
                    break;
                //VAFMANDANT VAFKOLL VAFART VAFFARBE VAFBEZ VAFFFARBE

            }
            
            Connect2Proxy(or1);
        }
        public DataSet QueryLMUSTER(DataRow dwData, int option = 1)
        {
            DataSet Return;
            DataSet Result = new DataSet();
            OracleCommand or1 = OracleDB.CreateCommand();
            switch (option)
            {
                case 0:
                    or1.CommandText = "SELECT * FROM LMUSTER WHERE  ROWNUM<2 ";
                    break;
              
                case 99:
                    or1.CommandText = "SELECT * FROM LMUSTER  WHERE ROWNUM<50";
                    break;
                default:
                    break;
            }
            Result = Connect2Proxy(or1);
            if (Result.Tables.Count > 0)
                Result.Tables[0].TableName = "LMUSTER";
            Return = Result;
            return Return;
        }
        public void DeleteLMUSTER(DataRow dwData, int option = 1)
        {

            OracleCommand or1 = OracleDB.CreateCommand();
            switch (option)
            {
                case 1:
                    or1.CommandText = "DELETE FROM LMUSTER   WHERE  VAKBMANDANT=:VAKBMANDANT AND VAKBKOLL=:VAKBKOLL AND VAKBART =:VAKBART AND VAKBFARBE=:VAKBFARBE AND VAKBKUNDNR=:VAKBKUNDNR";
                     or1.Parameters.Add("VAKBMANDANT", OracleType.NVarChar).Value = dwData["VAKBMANDANT"].ToString();
                    or1.Parameters.Add("VAKBKOLL", OracleType.NVarChar).Value = dwData["VAKBKOLL"].ToString();
                    or1.Parameters.Add("VAKBART", OracleType.NVarChar).Value = dwData["VAKBART"].ToString();
                    or1.Parameters.Add("VAKBFARBE", OracleType.NVarChar).Value = dwData["VAKBFARBE"].ToString();
                    or1.Parameters.Add("VAKBKUNDNR", OracleType.NVarChar).Value = dwData["VAKBKUNDNR"].ToString();
                    break;
                default:
                    break;
            }
            Connect2Proxy(or1);
        } 
      
        public void UpdateLMUSTER(DataRow dwData, string ITXDBVERSION = "50.24", int option = 1)
        {
            OracleCommand or1;
            DataSet Result = new DataSet();
            or1 = OracleDB.CreateCommand();
            switch (option)
            {
                case 1:
                    #region====Command==== 
                    or1.CommandText = "UPDATE LMUSTER SET "
                    +"LMMANDANT= :LMMANDANT,"
                    +"LMKUNDNR= :LMKUNDNR,"
                    +"LMWERK= :LMWERK,"
                    +"LMABT= :LMABT,"
                    +"LMART= :LMART,"
                    +"LMVAR= :LMVAR,"
                    +"LMMUART= :LMMUART,"
                    +"LMFARBE= :LMFARBE,"
                    +"LMVERSION= :LMVERSION,"
                    +"LMFARBBEZ= :LMFARBBEZ,"
                    +"LMAUFKRS= :LMAUFKRS,"
                    +"LMAUFLFD= :LMAUFLFD,"
                    +"LMAUFPOS= :LMAUFPOS,"
                    +"LMLABORFB= :LMLABORFB,"
                    +"LMANGEDAT= :LMANGEDAT,"
                    +"LMVERTDAT= :LMVERTDAT,"
                    +"LMVORLDAT= :LMVORLDAT,"
                    +"LMAKZPDAT= :LMAKZPDAT,"
                    +"LMAWERK= :LMAWERK,"
                    +"LMAABT= :LMAABT,"
                    +"LMAART= :LMAART,"
                    +"LMAVAR= :LMAVAR,"
                    +"LMSPGRD= :LMSPGRD,"
                    +"LMSPSB= :LMSPSB,"
                    +"LMVERMERK= :LMVERMERK,"
                    +"LMKSTKRS1= :LMKSTKRS1,"
                    +"LMKST1= :LMKST1,"
                    +"LMANZ1= :LMANZ1,"
                    +"LMVORLNR1= :LMVORLNR1,"
                    +"LMMUNR1= :LMMUNR1,"
                    +"LMAKSTKRS1= :LMAKSTKRS1,"
                    +"LMAKST1= :LMAKST1,"
                    +"LMADAT1= :LMADAT1,"
                    +"LMMUKL1= :LMMUKL1,"
                    +"LMTOLFKT1= :LMTOLFKT1,"
                    +"LMKSTKRS2= :LMKSTKRS2,"
                    +"LMKST2= :LMKST2,"
                    +"LMANZ2= :LMANZ2,"
                    +"LMVORLNR2= :LMVORLNR2,"
                    +"LMMUNR2= :LMMUNR2,"
                    +"LMAKSTKRS2= :LMAKSTKRS2,"
                    +"LMAKST2= :LMAKST2,"
                    +"LMADAT2= :LMADAT2,"
                    +"LMMUKL2= :LMMUKL2,"
                    +"LMTOLFKT2= :LMTOLFKT2,"
                    +"LMKSTKRS3= :LMKSTKRS3,"
                    +"LMKST3= :LMKST3,"
                    +"LMANZ3= :LMANZ3,"
                    +"LMVORLNR3= :LMVORLNR3,"
                    +"LMMUNR3= :LMMUNR3,"
                    +"LMAKSTKRS3= :LMAKSTKRS3,"
                    +"LMAKST3= :LMAKST3,"
                    +"LMADAT3= :LMADAT3,"
                    +"LMMUKL3= :LMMUKL3,"
                    +"LMTOLFKT3= :LMTOLFKT3,"
                    +"LMKSTKRS4= :LMKSTKRS4,"
                    +"LMKST4= :LMKST4,"
                    +"LMANZ4= :LMANZ4,"
                    +"LMVORLNR4= :LMVORLNR4,"
                    +"LMMUNR4= :LMMUNR4,"
                    +"LMAKSTKRS4= :LMAKSTKRS4,"
                    +"LMAKST4= :LMAKST4,"
                    +"LMADAT4= :LMADAT4,"
                    +"LMMUKL4= :LMMUKL4,"
                    +"LMTOLFKT4= :LMTOLFKT4,"
                    +"LMKSTKRS5= :LMKSTKRS5,"
                    +"LMKST5= :LMKST5,"
                    +"LMANZ5= :LMANZ5,"
                    +"LMVORLNR5= :LMVORLNR5,"
                    +"LMMUNR5= :LMMUNR5,"
                    +"LMAKSTKRS5= :LMAKSTKRS5,"
                    +"LMAKST5= :LMAKST5,"
                    +"LMADAT5= :LMADAT5,"
                    +"LMMUKL5= :LMMUKL5,"
                    +"LMTOLFKT5= :LMTOLFKT5,"
                    +"LMKSTKRS6= :LMKSTKRS6,"
                    +"LMKST6= :LMKST6,"
                    +"LMANZ6= :LMANZ6,"
                    +"LMVORLNR6= :LMVORLNR6,"
                    +"LMMUNR6= :LMMUNR6,"
                    +"LMAKSTKRS6= :LMAKSTKRS6,"
                    +"LMAKST6= :LMAKST6,"
                    +"LMADAT6= :LMADAT6,"
                    +"LMMUKL6= :LMMUKL6,"
                    +"LMTOLFKT6= :LMTOLFKT6,"
                    +"LMFKARTE= :LMFKARTE,"
                    +"LMFILLER= :LMFILLER,"
                    +"LMAENDZL= :LMAENDZL,"
                    +"LMAENDBEN= :LMAENDBEN,"
                    +"LMAENDDAT= :LMAENDDAT,"
                    +"LMNEUBEN= :LMNEUBEN,"
                    +"LMNEUDAT= :LMNEUDAT,"
                        + " WHERE  "
                        + "  VAKBMANDANT=:VAKBMANDANT AND VAKBKOLL=:VAKBKOLL AND VAKBART =:VAKBART AND VAKBFARBE=:VAKBFARBE AND VAKBKUNDNR=:VAKBKUNDNR";
                    #endregion

                    #region====Parameters====
          or1.Parameters.Add("LMMANDANT", OracleType.NVarChar).Value = dwData["LMMANDANT"].ToString(); 
          or1.Parameters.Add("LMKUNDNR", OracleType.NVarChar).Value = dwData["LMKUNDNR"].ToString(); 
          or1.Parameters.Add("LMWERK", OracleType.NVarChar).Value = dwData["LMWERK"].ToString(); 
          or1.Parameters.Add("LMABT", OracleType.NVarChar).Value = dwData["LMABT"].ToString(); 
          or1.Parameters.Add("LMART", OracleType.NVarChar).Value = dwData["LMART"].ToString(); 
          or1.Parameters.Add("LMVAR", OracleType.NVarChar).Value = dwData["LMVAR"].ToString(); 
          or1.Parameters.Add("LMMUART", OracleType.NVarChar).Value = dwData["LMMUART"].ToString(); 
          or1.Parameters.Add("LMFARBE", OracleType.NVarChar).Value = dwData["LMFARBE"].ToString(); 
          or1.Parameters.Add("LMVERSION", OracleType.NVarChar).Value = dwData["LMVERSION"].ToString(); 
          or1.Parameters.Add("LMFARBBEZ", OracleType.NVarChar).Value = dwData["LMFARBBEZ"].ToString(); 
          or1.Parameters.Add("LMAUFKRS", OracleType.NVarChar).Value = dwData["LMAUFKRS"].ToString(); 
          or1.Parameters.Add("LMAUFLFD", OracleType.NVarChar).Value = dwData["LMAUFLFD"].ToString(); 
          or1.Parameters.Add("LMAUFPOS", OracleType.NVarChar).Value = dwData["LMAUFPOS"].ToString(); 
          or1.Parameters.Add("LMLABORFB", OracleType.NVarChar).Value = dwData["LMLABORFB"].ToString(); 
          or1.Parameters.Add("LMANGEDAT", OracleType.NVarChar).Value = dwData["LMANGEDAT"].ToString(); 
          or1.Parameters.Add("LMVERTDAT", OracleType.NVarChar).Value = dwData["LMVERTDAT"].ToString(); 
          or1.Parameters.Add("LMVORLDAT", OracleType.NVarChar).Value = dwData["LMVORLDAT"].ToString(); 
          or1.Parameters.Add("LMAKZPDAT", OracleType.NVarChar).Value = dwData["LMAKZPDAT"].ToString(); 
          or1.Parameters.Add("LMAWERK", OracleType.NVarChar).Value = dwData["LMAWERK"].ToString(); 
          or1.Parameters.Add("LMAABT", OracleType.NVarChar).Value = dwData["LMAABT"].ToString(); 
          or1.Parameters.Add("LMAART", OracleType.NVarChar).Value = dwData["LMAART"].ToString(); 
          or1.Parameters.Add("LMAVAR", OracleType.NVarChar).Value = dwData["LMAVAR"].ToString(); 
          or1.Parameters.Add("LMSPGRD", OracleType.NVarChar).Value = dwData["LMSPGRD"].ToString(); 
          or1.Parameters.Add("LMSPSB", OracleType.NVarChar).Value = dwData["LMSPSB"].ToString(); 
          or1.Parameters.Add("LMVERMERK", OracleType.NVarChar).Value = dwData["LMVERMERK"].ToString(); 
          or1.Parameters.Add("LMKSTKRS1", OracleType.NVarChar).Value = dwData["LMKSTKRS1"].ToString(); 
          or1.Parameters.Add("LMKST1", OracleType.NVarChar).Value = dwData["LMKST1"].ToString(); 
          or1.Parameters.Add("LMANZ1", OracleType.NVarChar).Value = dwData["LMANZ1"].ToString(); 
          or1.Parameters.Add("LMVORLNR1", OracleType.NVarChar).Value = dwData["LMVORLNR1"].ToString(); 
          or1.Parameters.Add("LMMUNR1", OracleType.NVarChar).Value = dwData["LMMUNR1"].ToString(); 
          or1.Parameters.Add("LMAKSTKRS1", OracleType.NVarChar).Value = dwData["LMAKSTKRS1"].ToString(); 
          or1.Parameters.Add("LMAKST1", OracleType.NVarChar).Value = dwData["LMAKST1"].ToString(); 
          or1.Parameters.Add("LMADAT1", OracleType.NVarChar).Value = dwData["LMADAT1"].ToString(); 
          or1.Parameters.Add("LMMUKL1", OracleType.NVarChar).Value = dwData["LMMUKL1"].ToString(); 
          or1.Parameters.Add("LMTOLFKT1", OracleType.NVarChar).Value = dwData["LMTOLFKT1"].ToString(); 
          or1.Parameters.Add("LMKSTKRS2", OracleType.NVarChar).Value = dwData["LMKSTKRS2"].ToString(); 
          or1.Parameters.Add("LMKST2", OracleType.NVarChar).Value = dwData["LMKST2"].ToString(); 
          or1.Parameters.Add("LMANZ2", OracleType.NVarChar).Value = dwData["LMANZ2"].ToString(); 
          or1.Parameters.Add("LMVORLNR2", OracleType.NVarChar).Value = dwData["LMVORLNR2"].ToString(); 
          or1.Parameters.Add("LMMUNR2", OracleType.NVarChar).Value = dwData["LMMUNR2"].ToString(); 
          or1.Parameters.Add("LMAKSTKRS2", OracleType.NVarChar).Value = dwData["LMAKSTKRS2"].ToString(); 
          or1.Parameters.Add("LMAKST2", OracleType.NVarChar).Value = dwData["LMAKST2"].ToString(); 
          or1.Parameters.Add("LMADAT2", OracleType.NVarChar).Value = dwData["LMADAT2"].ToString(); 
          or1.Parameters.Add("LMMUKL2", OracleType.NVarChar).Value = dwData["LMMUKL2"].ToString(); 
          or1.Parameters.Add("LMTOLFKT2", OracleType.NVarChar).Value = dwData["LMTOLFKT2"].ToString(); 
          or1.Parameters.Add("LMKSTKRS3", OracleType.NVarChar).Value = dwData["LMKSTKRS3"].ToString(); 
          or1.Parameters.Add("LMKST3", OracleType.NVarChar).Value = dwData["LMKST3"].ToString(); 
          or1.Parameters.Add("LMANZ3", OracleType.NVarChar).Value = dwData["LMANZ3"].ToString(); 
          or1.Parameters.Add("LMVORLNR3", OracleType.NVarChar).Value = dwData["LMVORLNR3"].ToString(); 
          or1.Parameters.Add("LMMUNR3", OracleType.NVarChar).Value = dwData["LMMUNR3"].ToString(); 
          or1.Parameters.Add("LMAKSTKRS3", OracleType.NVarChar).Value = dwData["LMAKSTKRS3"].ToString(); 
          or1.Parameters.Add("LMAKST3", OracleType.NVarChar).Value = dwData["LMAKST3"].ToString(); 
          or1.Parameters.Add("LMADAT3", OracleType.NVarChar).Value = dwData["LMADAT3"].ToString(); 
          or1.Parameters.Add("LMMUKL3", OracleType.NVarChar).Value = dwData["LMMUKL3"].ToString(); 
          or1.Parameters.Add("LMTOLFKT3", OracleType.NVarChar).Value = dwData["LMTOLFKT3"].ToString(); 
          or1.Parameters.Add("LMKSTKRS4", OracleType.NVarChar).Value = dwData["LMKSTKRS4"].ToString(); 
          or1.Parameters.Add("LMKST4", OracleType.NVarChar).Value = dwData["LMKST4"].ToString(); 
          or1.Parameters.Add("LMANZ4", OracleType.NVarChar).Value = dwData["LMANZ4"].ToString(); 
          or1.Parameters.Add("LMVORLNR4", OracleType.NVarChar).Value = dwData["LMVORLNR4"].ToString(); 
          or1.Parameters.Add("LMMUNR4", OracleType.NVarChar).Value = dwData["LMMUNR4"].ToString(); 
          or1.Parameters.Add("LMAKSTKRS4", OracleType.NVarChar).Value = dwData["LMAKSTKRS4"].ToString(); 
          or1.Parameters.Add("LMAKST4", OracleType.NVarChar).Value = dwData["LMAKST4"].ToString(); 
          or1.Parameters.Add("LMADAT4", OracleType.NVarChar).Value = dwData["LMADAT4"].ToString(); 
          or1.Parameters.Add("LMMUKL4", OracleType.NVarChar).Value = dwData["LMMUKL4"].ToString(); 
          or1.Parameters.Add("LMTOLFKT4", OracleType.NVarChar).Value = dwData["LMTOLFKT4"].ToString(); 
          or1.Parameters.Add("LMKSTKRS5", OracleType.NVarChar).Value = dwData["LMKSTKRS5"].ToString(); 
          or1.Parameters.Add("LMKST5", OracleType.NVarChar).Value = dwData["LMKST5"].ToString(); 
          or1.Parameters.Add("LMANZ5", OracleType.NVarChar).Value = dwData["LMANZ5"].ToString(); 
          or1.Parameters.Add("LMVORLNR5", OracleType.NVarChar).Value = dwData["LMVORLNR5"].ToString(); 
          or1.Parameters.Add("LMMUNR5", OracleType.NVarChar).Value = dwData["LMMUNR5"].ToString(); 
          or1.Parameters.Add("LMAKSTKRS5", OracleType.NVarChar).Value = dwData["LMAKSTKRS5"].ToString(); 
          or1.Parameters.Add("LMAKST5", OracleType.NVarChar).Value = dwData["LMAKST5"].ToString(); 
          or1.Parameters.Add("LMADAT5", OracleType.NVarChar).Value = dwData["LMADAT5"].ToString(); 
          or1.Parameters.Add("LMMUKL5", OracleType.NVarChar).Value = dwData["LMMUKL5"].ToString(); 
          or1.Parameters.Add("LMTOLFKT5", OracleType.NVarChar).Value = dwData["LMTOLFKT5"].ToString(); 
          or1.Parameters.Add("LMKSTKRS6", OracleType.NVarChar).Value = dwData["LMKSTKRS6"].ToString(); 
          or1.Parameters.Add("LMKST6", OracleType.NVarChar).Value = dwData["LMKST6"].ToString(); 
          or1.Parameters.Add("LMANZ6", OracleType.NVarChar).Value = dwData["LMANZ6"].ToString(); 
          or1.Parameters.Add("LMVORLNR6", OracleType.NVarChar).Value = dwData["LMVORLNR6"].ToString(); 
          or1.Parameters.Add("LMMUNR6", OracleType.NVarChar).Value = dwData["LMMUNR6"].ToString(); 
          or1.Parameters.Add("LMAKSTKRS6", OracleType.NVarChar).Value = dwData["LMAKSTKRS6"].ToString(); 
          or1.Parameters.Add("LMAKST6", OracleType.NVarChar).Value = dwData["LMAKST6"].ToString(); 
          or1.Parameters.Add("LMADAT6", OracleType.NVarChar).Value = dwData["LMADAT6"].ToString(); 
          or1.Parameters.Add("LMMUKL6", OracleType.NVarChar).Value = dwData["LMMUKL6"].ToString(); 
          or1.Parameters.Add("LMTOLFKT6", OracleType.NVarChar).Value = dwData["LMTOLFKT6"].ToString(); 
          or1.Parameters.Add("LMFKARTE", OracleType.NVarChar).Value = dwData["LMFKARTE"].ToString(); 
          or1.Parameters.Add("LMFILLER", OracleType.NVarChar).Value = dwData["LMFILLER"].ToString(); 
          or1.Parameters.Add("LMAENDZL", OracleType.NVarChar).Value = dwData["LMAENDZL"].ToString(); 
          or1.Parameters.Add("LMAENDBEN", OracleType.NVarChar).Value = dwData["LMAENDBEN"].ToString(); 
          or1.Parameters.Add("LMAENDDAT", OracleType.NVarChar).Value = dwData["LMAENDDAT"].ToString(); 
          or1.Parameters.Add("LMNEUBEN", OracleType.NVarChar).Value = dwData["LMNEUBEN"].ToString(); 
          or1.Parameters.Add("LMNEUDAT", OracleType.NVarChar).Value = dwData["LMNEUDAT"].ToString(); 
                    #endregion
                    break; 
                default:
                    break;
            }


            Connect2Proxy(or1);
        }
    }
}
